package com.atguigu.product.controller;

import com.atguigu.pojo.Product;
import com.atguigu.product.service.ProductService;
import com.atguigu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName:ProducrSearchController
 * Package:com.atguigu.product.controller
 * Description:
 *
 * @Author 应永豪
 * @Create 2024/4/22 9:09
 * @Version 1.0
 */
@RestController
@RequestMapping("product")
public class ProductSearchController {

    @Autowired
    private ProductService productService;
    @GetMapping("list")
    public List<Product> allList(){
        return productService.allList();
    }
}
